Tags: #◇Computer Science #◇CCAPDEV #◇Web Development #◇NodeJS #◇MongoDB #◇Reviewer #◇Finals
CCAPDEV Comprehensive Finals Reviewer
◇Overview
This reviewer consolidates Web Application Development (CCAPDEV). Subjects span semantic HTML5, modern CSS (Flexbox, CSS Grid, specificity hierarchy), client-side JavaScript (DOM manipulation, asynchronous fetch, event loop), Node.js server architecture, Express middleware pipelines, RESTful API design, template engines (Handlebars), MongoDB NoSQL database modeling via Mongoose, and session authentication and security practices (cookies, express-session, bcrypt password hashing, input sanitization).
◇1. Full-Stack Architecture & Express Middleware Pipeline
◇2. Core Web Technologies Comparison Matrix
| Technology / Component | Role / Layer | Key APIs / Syntax | Best Practices |
|---|---|---|---|
| CSS Specificity | Styling Layer | Inline (1000) > ID (100) > Class (10) > Element (1) | Prefer reusable classes; avoid !important |
| JavaScript Asynchrony | Client/Server Logic | Promises, async/await, fetch() | Always wrap await calls in try...catch blocks |
| Express Middleware | Server Pipeline | app.use((req, res, next) => { ... next(); }) | Call next() to pass control; return on res.send() |
| Mongoose Models | Database ODM | new mongoose.Schema({...}), Model.find(), create() | Enforce validation, indexes, and schema constraints |
| Authentication & Hash | Security Layer | bcrypt.hash(password, saltRounds), bcrypt.compare() | Never store plaintext passwords; use 10+ salt rounds |
◇3. High-Yield Exam Checklist
- Does
bcrypt.hash()automatically generate and store the salt within the resulting hash string? YES ($2b$10$...contains algorithm, cost, salt, and hash). - In Express, what happens if a middleware does NOT call
next()or send a response (res.json)? The client request hangs indefinitely until timeout! - Is
localStoragesafe for storing sensitive session tokens against XSS attacks? NO, preferHttpOnlysecure cookies. - What is the difference between MongoDB
find()andfindOne()?find()returns an array/cursor of matching documents;findOne()returns a single document object (ornull). - Does CSS
display: flexalign items along the cross axis usingalign-itemsand main axis usingjustify-content? YES.
◇References & Navigation
- Previous Topic: ◇CCPROG3
- Next Topic: None
- Prerequisites: ◇Web Development, HTML, CSS, JavaScript, Express, MongoDB
- Cross-Curricular Connections: ◇CCINFOM
ACTIVE RECALL VERIFICATION
Select an answer to verify conceptual comprehension and reveal the technical rationale.
In CSS specificity calculation, which of the following selectors has the highest specificity?
In an Express.js middleware function, what must be invoked to pass control to the subsequent middleware handler in the stack?
Why should session identifier cookies always be configured with the httpOnly: true attribute?
What is the return value of await bcrypt.compare(submittedPassword, storedHash) when the submitted password matches?
In Mongoose, which method atomically updates an existing document and returns the newly modified document when { new: true } is passed?